﻿using System.Windows;
using System.Windows.Controls;
using Drafter.ViewModel;
using GalaSoft.MvvmLight.Messaging;

namespace Drafter
{
	/// <summary>
	/// Description for InitialView.
	/// </summary>
	public partial class InitialView : UserControl
	{
		/// <summary>
		/// Initializes a new instance of the InitialView class.
		/// </summary>
		public InitialView()
		{
			InitializeComponent();
		


            //Dialogo para abrir un fichero
            Messenger.Default.Register<DialogMessage>(
                this,
                msg =>
                {
                    var result = MessageBox.Show(
                        msg.Content,
                        msg.Caption,
                        msg.Button);

                    // Send callback
                    msg.ProcessCallback(result);
                });
		}

		private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
		{

       
			//Application.Current.Shutdown();
		}

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            Messenger.Default.Send<string>("EditView");
        }
	}
}